﻿import cgi
import os 
#from google.appengine.ext import db
#from google.appengine.ext.webapp import template
from google.appengine.ext import webapp                                        
from google.appengine.ext.webapp.util import run_wsgi_app                      
import logging                                                                 
#from datetime import date
#import datetime 
from StringIO import StringIO                                                  
import traceback
import simplejson
import xmlrpclib
from xmlrpcserver import XmlRpcServer
#from google.appengine.api import users
from decimal import *


from xmlWs import XmlUtilities
from jsonWs import JsonUtilities

from controllers import *

openIdProviders = (
    'Gmail.com', # shorter alternative: "Gmail.com"
    # add more here
)

        
application = webapp.WSGIApplication([                                          
            ('/', Home.Main),
            ('/signCompany', Company.Sign),
            ('/img', Company.Image),
            ('/formCompany', Company.Form),
            ('/detailCompany', Company.Details),
			('/formPostJob', Job.Form),
            ('/completeJob', Job.Sign),
            ('/detailJob', Job.Details),
            ('/managerJob', Job.Manager),
            ('/searchJob', Job.Search),
            ('/updateJob', Job.Update),
            ('/rpc', JsonUtilities.RPCHandler),
	        ('/xmlrpc/', XmlUtilities.XMLRpcHandler),
            ('/AdminSite',Admin.Form),
            ('/AdminSiteView',Admin.View),
            ('/AdminSiteEdit',Admin.Edit),
            ('/AdminSiteEditLV',Admin.EditLinhVuc),
            ('/AdminSiteCreateLV',Admin.CreateLinhVuc),
            ('/AdminSiteEditNN',Admin.EditNganhNghe),
            ('/AdminSiteCreateNN',Admin.CreateNganhNghe),
            ('/AdminSiteEditNTD',Admin.EditNhaTuyenDung),
            ('/AdminSiteEditDDT',Admin.EditDonDangTuyen),
            ('/DeveloperSite',Developer.Form),
            ('/DeveloperSiteEdit',Developer.Edit),
            ('/DeveloperSiteEditLV',Developer.EditLinhVuc),
            ('/DeveloperSiteEditNN',Developer.EditNganhNghe),
            ('/DeveloperSiteEditNTD',Developer.EditNhaTuyenDung),
            ('/DeveloperSiteEditDDT',Developer.EditDonDangTuyen),
            ('/siteMap', Home.SiteMap),
            ('/aboutUs', Home.AboutUs),
            ('/contactUs', Home.ContactUs),
            ('/services', Home.Service),
            ('/testAndroid', Home.TestAndroid)
            ], debug=True)


def main():
  run_wsgi_app(application)                                                    
        
if __name__ == "__main__":
    main()
